<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<div id="app">
    <!--<p v-on:click="pclick">{{name}}</p>-->
        <p @click="pclick">{{name}}</p>
    <!--<input type="text" v-bind:value="name">-->
    <!--v-bind:简写 -->
        <!--<input type="text" :value="name">-->
        <input type="text" v-model="name">
</div>
<script src="lib/vue.js"></script>
<script>
 /*1.m 2.v 3.vm*/
 var vm=new Vue({
     /*代表元素*/
     el:"#app",
     data:{
         /*数据*/
         name:"sunxiuyang"
     },
     methods:{
       /*  pclick:function () {
             alert(this.name);
         }*/
         pclick() {
             alert(this.name);
         }
     }
 })



</script>
</body>
</html>